<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: cross_selling.php 135 2013-09-22 07:30:55Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 135 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-22 07:30:55 +0000 (Sun, 22 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$module_smarty = new Smarty;
$module_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');

$list_data = get_list_data('cross_selling');
$data = $product->getCrossSells($list_data);

if (count($data) > 0) {
	$module_smarty->assign('language', $_SESSION['language']);
	$module_smarty->assign('module_content', $data);
	$module_smarty->assign('cross_selling', true);
	$module_smarty->assign('TITLE', CROSS_SELLING);
	$module_smarty->assign('LIST_NAME', 'cross_selling');
	if($list_data['col']>1)
		$module_smarty->assign('CLASS_NAME', 'grid');
	else
		$module_smarty->assign('CLASS_NAME', 'list');
	
	$module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/'.$list_data['list_file'].'.html');

	$info_smarty->assign('MODULE_cross_selling', $module);
}

if (ACTIVATE_REVERSE_CROSS_SELLING=='true') {
	$module_smarty = new Smarty;
	
	$list_data = get_list_data('reverse_cross_selling');
	
	$data = $product->getReverseCrossSells($list_data);
	if (count($data) > 0) {
		$module_smarty->assign('language', $_SESSION['language']);
		$module_smarty->assign('module_content', $data);
		$module_smarty->assign('TITLE', REVERSE_CROSS_SELLING);
		$module_smarty->assign('LIST_NAME', 'reverse_cross_selling');
		if($list_data['col']>1)
			$module_smarty->assign('CLASS_NAME', 'grid');
		else
			$module_smarty->assign('CLASS_NAME', 'list');
		
		$module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/'.$list_data['list_file'].'.html');

		$info_smarty->assign('MODULE_reverse_cross_selling', $module);
	}
}
?>